Skip to content

fix the addition instruction in the naked asm example #1654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

folkertdev
Copy link
Contributor

@folkertdev folkertdev commented Jun 26, 2025

turns out LLVM does not have your back and will just let you emit an invalid add instruction with 3 operands.

cc #1651 (comment)

Rendered

@senekor senekor merged commit 2274074 into rust-lang:master Jun 26, 2025
5 checks passed
@cuviper
Copy link
Member

cuviper commented Jun 26, 2025

For good measure, here it is verified, and you can "show asm" too:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=9c1fd92c8ecdadeb102fc0487e441dff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants